﻿{% if CurrentBlog %}
       	<a target="_blank" href="/usershow?item={{ CurrentBlog.LoginName }}">
	<img src = "/userphoto?item={{ CurrentBlog.LoginName }}" width="32px" height="32px" alt="{{ CurrentBlog.LoginName }}">
	</a>
	<b>{{ CurrentBlog.Title }}</b>&nbsp;{{ CurrentBlog.Date|date:" Y-m-j H:i:s" }}
	<br>评论数：{{ CurrentBlog.CommentOnNumber }}
	<blockquote>
		{{ CurrentBlog.Content }}
	</blockquote>

	{% for CommentOnItem in CommentOns %}
		{% if IsAdmin%}
			<form action="/blog_commenton_delete?tag={{ Tag }}&blogpage={{ CurBlogPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentBlog.key }}" method="post">
		{% else %}
			{% ifequal 'my' Tag %}
				<form action="/blog_commenton_delete?tag={{ Tag }}&blogpage={{ CurBlogPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentBlog.key }}" method="post">
			{% endifequal %}
		{% endif %}

		<HR />
		<a target="_blank" href="/usershow?item={{ CommentOnItem.LoginName }}">
		<img src = "/userphoto?item={{ CommentOnItem.LoginName }}" width="32px" height="32px" alt="{{ CommentOnItem.LoginName }}">
		</a>
        	&nbsp;{{ CommentOnItem.Date|date:" Y-m-j H:i:s" }}
		<blockquote>{{ CommentOnItem.Content }}</blockquote>

		{% if IsAdmin %}
			<div><input type="hidden" name="deletecommentonkey" value="{{ CommentOnItem.key }}"/></div>
			<div><input type="submit" value="删除"/></div>
			</form>
		{% else %}
			{% ifequal 'my' Tag %}
				<div><input type="hidden" name="deletecommentonkey" value="{{ CommentOnItem.key }}"/></div>
				<div><input type="submit" value="删除"/></div>
				</form>
			{% endifequal %}
		{% endif %}
	{% endfor %}

	<p align = "right">
	{% if PreCommentOnPage %}
		<a href = "/blog?tag={{ Tag }}&blogpage={{ CurBlogPage }}&commentonpage={{ PreCommentOnPage }}&item={{ CurrentBlog.key }}">上一页</a>
	{% endif %}

	{% if NextCommentOnPage %}
		<a href = "/blog?tag={{ Tag }}&blogpage={{ CurBlogPage }}&commentonpage={{ NextCommentOnPage }}&item={{ CurrentBlog.key }}">下一页</a>
	{% endif %}
	</p>

	
	<hr />
	<p>发表评论：</p>
	<form action="/blog_commenton_add?tag={{ Tag }}&blogpage={{ CurBlogPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentBlog.key }}" method="post">
		<div><font color=red>注意：内容最多200汉字</font><br>
		<textarea name="content" rows="5" cols="60"></textarea></div>
		<div><input type="submit" value="提交"></div>
	</form>
{% endif %}